package com.cubeofnine.sugar;

import android.os.Bundle;
import android.os.Handler;
import android.util.Log;
import android.view.WindowManager;

public class FirstScreenActivity extends ActivityImpt {

	public void onCreate(Bundle savedInstanceState) {
		Log.i(FirstScreenActivity.class.getName(), "onCreate() : Start");

		getWindow().addFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN);

		super.onCreate(savedInstanceState);
		setContentView(R.layout.first_screen);

		Log.i(FirstScreenActivity.class.getName(), "onCreate() : End");
	}

	@Override
	protected void onResume() {
		super.onResume();

		// SLEEP 3 SECONDS
		Handler handler = new Handler();
		handler.postDelayed(new PreparingSwitchingRunnable(this), 3000);
	}

	@Override
	public void onBackPressed() {
		moveTaskToBack(true);
		closeApplication();
	}

	public void gotoLoginActivity() {
		gotoActivity(LoginActivity.class);
	}
}
